package com.hopu.service.Impl;

import com.hopu.mapper.CusMapper;
import com.hopu.pojo.Cus;
import com.hopu.service.CusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CusServiceImpl implements CusService {
@Autowired
private CusMapper cusMapper;

    @Override
    public List<Cus> findAllCustom() {
        return cusMapper.findAllCustom();
    }

    @Override
    public int insCus(String cname, String csex, String ctel, String ctel1, String ccard) {
        return cusMapper.insCus(cname,csex,ctel,ctel1,ccard);
    }

    @Override
    public Cus findCusById(int cid) {
        Cus cus = cusMapper.findCusById(cid);
        return cus;
    }

    @Override
    public int uppCus(Cus cus) {
        int cus1 = cusMapper.uppCus(cus);
        return cus1;
    }

    @Override
    public Cus findCus(String ccard, Integer cid) {
        Cus cus = cusMapper.findCus(ccard,cid);
        return cus;
    }
}
